﻿@{
    ViewBag.Title = "更改密码";
}
@{
    ViewBag.Title = "编辑用户";
    var user = ViewBag.user as HynuIOTA.Entity.User;
}
@section scripts
{
    <script>
        function doBegin() {
            window.top.$.msgBoxObj.showMsgInfo('正在提交数据....');
        }

        function doFail() {
            window.top.$.msgBoxObj.showMsgErr('网络异常!');
        }

        function doComplete(xhrObj) {
            $.processJsonMsg(xhrObj.responseText,
                null,
                function(response) {
                    if (response.Statu === 1) {
                        window.top.$.msgBoxObj.showMsgInfo('正在跳转页面...');
                        window.top.location.href = response.BackUrl;
                    }
                });
        }
    </script>
}
@section headSection
{
    <style>
        #news-form {
            margin: 50px auto;
            width: 400px;
            height: 400px;
        }

            #news-form .input-div {
                margin: 20px 20px 20px 40px;
                display: block;
            }
    </style>
}
<div>
    @using (Ajax.BeginForm("ChangePassword", new { area = "Users", controller = "User" }, new AjaxOptions()
    {
        HttpMethod = "Put",
        OnBegin = "doBegin",
        OnFailure = "doFail",
        OnComplete = "doComplete"
    }, new { id = "news-form", name = "news-form" }))
    {
        <div class="input-div"><input id="oldPassword" name="oldPassword" class="easyui-passwordbox" data-options="label:'旧密码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="newPassword" name="newPassword" class="easyui-passwordbox" data-options="label:'新密码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="newPassword1" name="newPassword1"  class="easyui-passwordbox" data-options="label:'确认密码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div">
            <input type="submit" class="easyui-linkbutton button-blue l-btn l-btn-small" style="width: 80px; height: 40px; margin: 10px 10px 10px 40%" value="保存" />
        </div>
    }
</div>

